home *** CD-ROM | disk | FTP | other *** search
/ Grand Slam 3 / Grand Slam 3.iso / 029 / mdva.arj / APAP.SCM next >
Text File  |  1995-08-25  |  6KB  |  151 lines

  1. ;
  2. ; APAP.scm = Macro to produce three panel APAPs,
  3. ; (Alignment of Elements Systems) at floor or specified altitude
  4. ; (for runways on elevated surfaces)
  5. ;
  6. ; Macro by Alan Misiaszek, 1995, CIS
  7. ; for use with SCASM.exe
  8. ;
  9. ; Macro( apap.scm Lat Lon UseAlt Alt Hdg Side TDP FPD Color)
  10. ;                  1  2   3      4   5   6    7   8   9
  11. ;
  12. ;   This macro should be used only in a RunwayCall'ed subroutine.
  13. ;   The scaling factor is set to feet to make all distances RunwayData
  14. ;   compatible and to permit the fine resolution necessary in heights for
  15. ;   panel alignment based on small glide slope angles.
  16. ;   Since SCASM cannot do parameter calculation you have to calculate the
  17. ;   distances and heights for the panels.
  18. ;   The Lat/Lon coordinates (Params 1,2) and Heading (Param 5) are
  19. ;   the same as for the runway.
  20. ;   Param 3 UseAltitude:
  21. ;         set at 0 if altitude is default floor     set Param 4 at 0
  22. ;         set at 1 if altitude is that in param 4   set Param 4 at actual alt
  23. ;
  24. ;   Param 6 is the lateral displacement from center of runway
  25. ;   (-numbers = panels on left side...no sign panels on right side)
  26. ;   The lateral displacement should be equal to one-half of the runway
  27. ;   width + 50 feet, ex. panel left of 50 ft rwy 25 + 50 = 75
  28. ;
  29. ;   Param 7 is the lengthwise displacement of the base (single) panel.
  30. ;   The panels are arranged as shown below
  31. ;                                |      |
  32. ;       Base Panel    []        |--------|     Touch Down Point
  33. ;   Front Panels  []      []   |          |
  34. ;                             |             |
  35. ;                            |               |
  36. ;                           |                 |
  37. ;                          |^^^^^^^^^^^^^^^^^^^|   Threshold
  38. ;   It will be at the same distance from the end of the runway as the
  39. ;   touch down point (TDP) for the indicated glide slope (GS) and
  40. ;   threshold crossing height (TCH).  The TDP can be calculated by
  41. ;   dividing the TCH by the tangent of the glide slope angle.
  42. ;   (A table is included below with these factors)
  43. ;   For example: If the glide slope is 5.25 deg and the TCH is 57 ft
  44. ;   then the TDP = 57 / 0.0919 = 620 ft
  45. ;   if the runway is 2550 ft in length Param 7 would be
  46. ;   (2550 / 2) - 620 = 655 ( -655 minus sign towards viewer from center point)
  47. ;   Remember to account for displaced thresholds in this calculation.
  48. ;
  49. ;   Param 8 is the distance to the front panel set. Since the height of the
  50. ;   top of the front panels is 10 ft the distance between panels can be
  51. ;   calculated by the same method above. (see table for values) add this value
  52. ;   to the base panel distance and change the sign to get this setting.
  53. ;
  54. ;   e.g. -655 + -109 = -764
  55. ;                                                (bright)   (regular)
  56. ;   Param 9 is the panel colors Recommeded: 13 = orange     08 = orange
  57. ;                                           14 = yellow     09 = yellow
  58. ;                                           15 = white      04 = white
  59. ;
  60. ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  61. ;apap Glide                                (Param 8)
  62. ;     slope    Tangent of  TDP & BPDist    FPDistance
  63. ;     angle    angle       factor(1/tan)   @10'difference in top panel height
  64. ;     7.00     0.1228      8.1443          81
  65. ;     6.75     0.1184      8.4490          84
  66. ;     6.50     0.1139      8.7769          88
  67. ;     6.25     0.1095      9.1309          91
  68. ;     6.00     0.1051      9.5144          95
  69. ;     5.75     0.1007      9.9310          99
  70. ;     5.50     0.0963     10.3854         104
  71. ;     5.25     0.0919     10.8829         109
  72. ;     5.00     0.0875     11.4301         114
  73. ;     4.75     0.0831     12.0346         120
  74. ;     4.50     0.0787     12.7062         127
  75. ;     4.25     0.0743     13.4566         135
  76. ;     4.00     0.0699     14.3007         143
  77. ;     3.75     0.0655     15.2571         153
  78. ;     3.50     0.0612     16.3499         163
  79. ;     3.25     0.0568     17.6106         176
  80. ;     3.00     0.0524     19.0811         191
  81. ;     >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  82. mif( %3 )
  83.     RefPoint( 2 :apap_end@ 0.3048 %1  %2 E= %4 )
  84. melse
  85.     RefPoint( 7 :apap_end@ 0.3048 %1  %2 )
  86. mifend
  87. RotatedCall( :apapB@ 0 0 %5 )
  88. Jump( :apap_end@ )
  89.  
  90. :apapB@
  91.     TransformCall( :apapBp@  %6  0  %7   0 0  0 0  0 0 )
  92.     TransformCall( :apapFp@  %6  0  %8   0 0  0 0  0 0 )
  93.     Return
  94.  
  95. :apapBp@
  96.     Points( 0
  97.          -9 0 0
  98.          -9 5 1
  99.           7 5 1
  100.           7 0 0
  101.          -9 0 2
  102.           7 0 2
  103.     )
  104.     SurfaceColor( %9 F0 )
  105.     Brightness( 100 )
  106.     Poly( a 0 1 2 3 )
  107.     SurfaceColor( 02 F0 )
  108.     Poly( a 4 5 2 1 )
  109.     Poly( a 5 3 2 )
  110.     Poly( a 0 4 1 )
  111.     Return
  112.  
  113. :apapFp@
  114.     Points( 0
  115.         -20 10 0    -20 15 1    -7 15 1   -7 10 0   -20 10 2    -7 10 2
  116.         -20  0 0    -20  0 2    -7  0 2   -7  0 0
  117.           7 10 0      7 15 1    20 15 1   20 10 0     7 10 2    20 10 2
  118.           7  0 0      7  0 2    20  0 2   20  0 0
  119.           )
  120.     SurfaceColor( %9 F0 )
  121.     Brightness( 100 )
  122.     Poly( a 0 1 2 3 )
  123.     Poly( a 10 11 12 13 )
  124.     SurfaceColor( 02 F0 )
  125.     Poly( a 0 4 1 )
  126.     Poly( a 5 3 2 )
  127.     Poly( a 10 14 11 )
  128.     Poly( a 15 13 12 )
  129.     Poly( a 4 5 2 1 )
  130.     Poly( a 14 15 12 11 )
  131.     LineColor( 02 F0 )
  132.     MoveToPt( 0 )
  133.     DrawToPt( 6 )
  134.     MoveToPt( 4 )
  135.     DrawToPt( 7 )
  136.     MoveToPt( 5 )
  137.     DrawToPt( 8 )
  138.     MoveToPt( 3 )
  139.     DrawToPt( 9 )
  140.     MoveToPt( 10 )
  141.     DrawToPt( 16 )
  142.     MoveToPt( 14 )
  143.     DrawToPt( 17 )
  144.     MoveToPt( 15 )
  145.     DrawToPt( 18 )
  146.     MoveToPt( 13 )
  147.     DrawToPt( 19 )
  148.     Return
  149. :apap_end@
  150. ; -----------------------------------------------
  151.